package com.terry.web.domain.dto;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
public class UserDto implements Serializable {

    @NotNull
    @NotBlank
    @Size(min = 4,max = 50,message = "用户名长度必须在 4 到 50 之间")
    private String username;

    @NotNull
    @NotBlank
    @Size(min = 8,max = 50,message = "密码长度必须在 8 到 50 之间")
    private String password;

    @NotNull
    @NotBlank
    @Size(min = 8,max = 50,message = "密码长度必须在 8 到 50 之间")
    private String matchPassword;

    @NotNull
    @Email
    private String email;

    @NotNull
    @NotBlank
    @Size(min = 8,max = 50,message = "性名长度必须在 8 到 50 之间")
    private String name;



}
